Additional properties accessible via code

isEmpty

Example: @If Grade.IsEmpty

where Grade is a list attribute.

This will test the evaluation status of the named attribute, returning TRUE if the attribute has not yet been obtained by inference (that is, where it is in the default 'Unassigned status'), or FALSE if the attribute has a value. Note that you cannot achieve this by testing if Grade is null, because null is not the same status that inference understands to be 'value not yet known'. Similarly, zero is not the same for a numeric attribute as 'value not yet known'. See also the topic on Static and Dynamic objects.

IsEmpty can be very useful to trap 'Unassigned status' objects within your @commands, which would normally result in a run time error message. See also the Knowledge Module Information property RaiseUnassignedErrors.

name

This property holds the name of the object and has its uses in user defined generic functions when combined with the reserved word 'self'.

nSelected

The number of selected values in a list.

nValid

The number of valid values in a list.

nValues

The total number of values in a list.

promptFor

example @If attribute.promptFor

This will test if the named attribute has obtained a value through inference, but the current status is also set to be evaluated again by inference. Typically, this will be the situation with an attribute whose isDynamic property is set to true, or where the Evaluate command has just been used.

selected[<index>]

This property can be used to test whether the indexed value in a list has been selected returning TRUE if the value has been selected, or FALSE if the value has not been selected.

selectedIndex

This property holds the index number of the selected value.

sql

This property holds the sql command string for the table object.

valid[<index>]

This property can be used to test whether the indexed value in a list is valid, returning TRUE if the value is valid or FALSE if the value is invalid.